package com.wsd.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 存储到Redis中的实体类
 */
@Data
public class UserRedisEntity implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    protected Integer id;

    @TableField("open_id")
    @NotNull
    protected String openId;

    @TableField("union_id")
    protected String unionId;

    @TableField("nickname")
    protected String nickName;

    @TableField("gender")
    protected Integer gender;

    @TableField("avatarUrl")
    protected String avatarUrl;

}